<template>
  <div class="dashboard-container">
    <div class="dashboard-text">customerData:{{ customerData }}</div>
    <el-button @click.native.prevent="CustomerGetInfo">客户数据</el-button>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'CustomerGetInfo',
  computed: {
    ...mapGetters([
      'customerData'
    ])
  },
  methods: {
    CustomerGetInfo() {
      this.$store.dispatch('CustomerGetInfo').then(() => {
        console.log('over')
      })
    }
  }
  // data() {
  //   const GetInfo = () => {
  //     GetInfo().then(response => {
  //       const data = response.data
  //       console.log(data)
  //       return data
  //     })
  //   }
  //   return {
  //     customerData: {
  //       GetInfo
  //     }
  //   }
  // },

}
</script>
